/*
 * @Description: 
 * @Author: Aroma
 * @Date: 2024-09-10 09:08:06
 * @LastEditors: Aroma
 * @LastEditTime: 2024-09-10 09:40:37
 * @别瞎看: 你个无脑牛马
 */
public class Teacher{
    //属性
    private String name;
    private char gender;
    private int num;
    //方法  封装 get  set 
    public Teacher(){
        System.out.println("调用Teacher的无参构造器");
    }
    public Teacher(String name,int num){
        this.name=name;
        this.num=num;
        System.out.println("调用Teacher的两参构造器");
    }
    public Teacher(String name,char gender,int num){
        this(name,num);
        this.gender=gender;
        System.out.println("调用Teacher的三参构造器");
    }
    public void setName(String name){
        this.name=name;
    }
    public String getName(){
        return name;
    }
    public void setGender(char gender){
        this.gender=gender;
    }
    public char getGender(){
        return gender;
    }
    public void setNum(int num){
        this.num=num;
    }
    public int getNum(){
        return num;
    }
    public void sayHello(){
        System.out.println(("大家好，我是"+name+","+gender+"性，我的工号是"+num));
    }
}